Returns a System.IO.Stream for the file inside the zipped package referenced by filePath.
Parent Type: ZipPackageReader
Namespace: Microsoft.LearningComponents
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public override Stream GetFileStream ( ) |
filePath
The file to retrieve. The path is relative to the root of the file hierarchy in the zipped package. If this path indicates a file that is not in the zipped package, a System.IO.FileNotFoundException is thrown.
System.IO.Stream for the specified file.
| Exception type | Condition |
| IOException | The file is already open. |
| ArgumentException | filePath contains invalid characters. |
| ArgumentNullException | filePath is null. |
| InvalidOperationException | The ZipPackageReader is in an error state. |
| FileNotFoundException | The file specified was not found. |
| Name | Description |
| System.Security.Permissions.FileIOPermission | for creating directories and reading and writing files. Associated enumerations: System.Security.Permissions.FileIOPermissionAccess.Read and System.Security.Permissions.FileIOPermissionAccess.Write. |
filePath is a relative path to the root of the zipped package.
The zipped package will be exploded into a temporary directory when this method is called, if not done previously.